/* 
 *  TaggedItem
 *
 *  TaggedItem is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Foobar is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY ); without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 **********************************************************************************
 *  WARNING: THIS CODE WAS GENERATED DO NOT MODIFY, CHANGE THE XSD INSTEAD
 *  Generated by schema2code on Tue Jun 14 15:34:00 2016.
 **********************************************************************************
 *  Copyright 2010
 *
 */

#ifndef __TAGGEDITEM_H__
#define __TAGGEDITEM_H__

#include <QObject>
#include <QString>
#include <QDateTime>

class XmlStreamReader;

namespace ivef {

//-----------------------------------------------------------
//! \brief       Class definition of TaggedItem
//!
//! Generic key/value pairs, can be used to pass information that is not (yet) in the standard, provided server and user agree upon interface. E.g. Blue sign indication for inland waterways, references to voyage or vesseldata (URL)
//!
class TaggedItem : public QObject { 
    Q_OBJECT

public:
    //! constructor
    //!
    TaggedItem();
    //! constructor for parser function
    //!
    TaggedItem(XmlStreamReader&);
    //! copy constructor
    //!
    TaggedItem(const TaggedItem&);
    //! = operator
    //!
    TaggedItem & operator=(const TaggedItem& val);
    //! == operator
    //!
    bool operator==(const TaggedItem& val);
    //! sets the Key: Key for the tagged item
    //!
    bool setKey(QString val);

    //! gets the Key: Key for the tagged item
    //!
    //! \return     QString
    //!
    QString getKey() const;

    //! sets the Value: Value of the tagged item, can be of any type
    //!
    bool setValue(QString val);

    //! gets the Value: Value of the tagged item, can be of any type
    //!
    //! \return     QString
    //!
    QString getValue() const;

    //! generates XML of this object including attributes and child elements
    //! returns QString::null if not all required elements are available
    //! If null returned check lastError() for problem description
    //!
    //! \return     QString
    const QString& toXML(bool outputNamespace = true);

    //! generates output of this object including attributes and child elements
    //!
    //! \return     QString
    QString toString() const;

    //! generates output of this object including attributes and child elements
    //!
    //! \return     QString
    QString toString(QString lead) const;

    //! return last error found in toXML function
    //!
    //! \return     QString
    const QString& lastError() const;

    //! return changed 
    //!
    //! \return     bool
    const bool& changed() const;

    //! return store 
    //!
    //! \return     QString
    const QString& store() const;


private:
    QString m_key;
    bool m_keyPresent;
    QString m_value;
    bool m_valuePresent;
    QString m_lastError; 
    bool m_changed; 
    QString m_store;
}; 
} //end ns

#endif
